package _02lambda的省略格式;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class DemoLambda {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        Collections.addAll(arrayList,22,11,44,33,55);

        Collections.sort(arrayList, (o1, o2) -> o2 - o1);
        //idea生成方法
        //1.原始代码 -> lambda  灰色的地方Alt+Enter选择replace lambda
        //2.lambda -> 原始代码  "->"处Alt+Enter选择 replace lambda with anonymous class
        System.out.println(arrayList);
    }
}
